package com.keldian.myqq.activity;

import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Log;
import android.widget.TabHost;
import android.widget.Toast;

import com.keldian.myqq.BuildConfig;
import com.keldian.myqq.R;
import com.keldian.myqq.tabhost.MyQQContact;
import com.keldian.myqq.tabhost.MyQQDynamic;
import com.keldian.myqq.tabhost.MyQQNews;

/**
 * Created by Administrator on 15-11-17.
 */
public class TabActivity extends android.app.TabActivity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tab_activity);

        TabHost tabHost1 = getTabHost();

        Intent intent1 = new Intent();
        intent1.setClass(this, MyQQNews.class);

        TabHost.TabSpec spec1 = tabHost1.newTabSpec("消息");
        Resources resources = getResources();

        spec1.setIndicator("消息", resources.getDrawable(R.drawable.actionbar_icon));
        spec1.setContent(intent1);
        tabHost1.addTab(spec1);


        TabHost tabHost2 = getTabHost();

        Intent intent2 = new Intent();
        intent2.setClass(this, MyQQContact.class);

        TabHost.TabSpec spec2 = tabHost2.newTabSpec("消息");
        Resources resources2 = getResources();
        spec2.setIndicator("消息", resources2.getDrawable(R.drawable.btn_ic_search));
        spec2.setContent(intent2);
        tabHost2.addTab(spec2);


        TabHost tabHost3 = getTabHost();

        Intent intent3 = new Intent();
        intent3.setClass(this, MyQQDynamic.class);

        TabHost.TabSpec spec3 = tabHost3.newTabSpec("消息");
        Resources resources3 = getResources();

        spec3.setIndicator("消息", resources3.getDrawable(R.drawable.app_panel_add_icon));
        spec3.setContent(intent3);
        tabHost1.addTab(spec3);
    }


}
